﻿using Prism.Mvvm;
using Prism.Services.Dialogs;
using System;

namespace Metro.Demo.ViewModels
{
	public class UserEditorDialogViewModel : BindableBase, IDialogAware
	{
		public UserEditorDialogViewModel()
		{

		}

		public string Title => "编辑用户";

		public event Action<IDialogResult> RequestClose;

		public bool CanCloseDialog()
		{
			return true;
		}

		public void OnDialogClosed()
		{
            //throw new NotImplementedException();
            RequestClose?.Invoke(new DialogResult(ButtonResult.Cancel));

        }

		public void OnDialogOpened(IDialogParameters parameters)
		{
			//throw new NotImplementedException();
		}
	}
}
